﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Mapbox.Map;
using Mapbox.Utils;

public class SortCoordinate : IComparer<Vector2d>
{
    public int Compare(Vector2d x, Vector2d y)
    {
        if (x.x < y.x)
        {
            return -1;
        }
        else if (x.x > y.x)
        {
            return 1;
        }
        else
        {
            if (x.y < y.y)
            {
                return -1;
            }
            else
            {
                return 1;
            }
        }
    }
}
